export default {
  path: '/',
  component: () => import('@/views/index'),
  redirect: '/home',
  children: [
    {
      path: 'home',
      name: '首页',
      component: () => import('@/views/index/home'),
      meta:{
        ignoreAuth: true
      }
    },
    {
      path: '/register',
      name: '注册',
      component: () => import('@/views/register'),
      meta:{
        ignoreAuth: true
      }
    },
    {
      path: '/sourceCode',
      name: 'sourceCode',
      component: () => import('@/views/index/sourceCode'),
      meta:{
        ignoreAuth: true
      }
    },
    {
      path: '/findMe',
      name: 'findMe',
      component: () => import('@/views/index/findMe'),
      meta:{
        ignoreAuth: true
      }
    },
    {
      path: '/other',
      name: 'other',
      component: () => import('@/views/index/other'),
      meta:{
        ignoreAuth: true
      }
    },
    {
      path: '/user', // 用户中心
      name: 'user',
      component: () => import('@/views/index/user/personalCenter'),
      redirect: '/center',
      children: [
        {
          path: '/center',
          name: 'center',
          component: () => import('@/views/index/user/userCenter'),
        },
        {
          path: '/user/address',
          name: 'userAddress',
          component: () => import('@/views/index/user/shopAddress'),
        },
        {
          path: '/user/MyOrders',
          name: 'MyOrders',
          component: () => import('@/views/index/user/MyOrders'),
        },
      ]
    },
    {
      path: '/goodsList/:type',
      name: 'goodsList',
      component: () => import('@/views/index/list/goodsList'),
      meta:{
        ignoreAuth: true
      }
    },
    {
      path: '/goodsDetails/:obj',
      name: 'goodsDetails',
      component: () => import('@/views/index/details/goodsDetails'),
      meta:{
        ignoreAuth: true
      }
    },
    {
      path: '/shoppingCart',
      name: 'shoppingCart',
      component: () => import('@/views/index/shops/shoppingCart'),
    },
    {
      path: '/shoppingConfirm',
      name: 'shoppingConfirm',
      component: () => import('@/views/index/shops/shoppingConfirm'),
    },
    {
      path: '/shopAddress',
      name: 'shopAddress',
      component: () => import('@/views/index/user/shopAddress'),
    },
    {
      path: '/paySuccess',
      name: 'paySuccess',
      component: () => import('@/views/index/pay/paySuccess'),
    },
  ]
}